import Mock from 'mockjs'
import WaybillData from '@/api/mock/data/waybill.wait-accept.data.js'
import CombineWaybillData from '@/api/mock/data/combine-waybill.data.js'
import DivideWaybillData from '@/api/mock/data/divide-waybill.data.js'
import WaybillAttachmentsData from '@/api/mock/data/waybill.attachments.data.js'

// /transport/divide/waybill/

Mock.mock(RegExp("/transport/waybill/\\d+"), "get", () => {
  console.log("Use mock waybill data:", WaybillData)
  return WaybillData
})

Mock.mock(RegExp("/transport/combine/\\d+"), "get", () => {
  console.log("Use mock combine waybill data:", CombineWaybillData)
  return CombineWaybillData
})

Mock.mock(RegExp("/transport/divide/waybill/\\d+"), "get", () => {
  console.log("Use mock divide waybill data:", DivideWaybillData)
  return DivideWaybillData
})

Mock.mock(RegExp("/transport/attachment/search"), "post", () => {
  console.log("Use mock waybill attachments data:", WaybillAttachmentsData)
  return WaybillAttachmentsData
})
